// src/api/home.js
// import httpInstance from "@/utils/http";
import { httpInstance }  from "@/utils/http";


// 封装banner 的接口函数，指定输入参数默认空对象
export const getBannerAPI = (params = {}) => {
  // 默认参数为1，商品为2
  const { distributionSite = '1' } = params;
  return httpInstance({
    url: '/home/banner',
    params: {
      distributionSite
    }
  });
};

// 封装获取新鲜好物接口函数
export const findNewAPI = () => {
  return httpInstance({
    url: '/home/new',
  });
};

// 封装获取人气推荐接口函数
export const getHotAPI = () => {
  return httpInstance({
    url: '/home/hot',
  });
};

// 封装获取商品数据接口函数
export const getGoodsAPI = () => {
  return httpInstance({
    url: '/home/goods',
  });
};


